// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, getRequestToken, postRequestToken, postRequest, putRequest, postBodyRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios';

//获取网签职位类别
export const getPositionAPI = () => {
    return getRequest('/dictData/getByType/job-position-category');
};

//获取职位类别
export const getnetPositionAPI = () => {
    return getRequest('/dictData/getByType/job_category');
};
//获取行业
export const getIndustryAPI = () => {
    return getRequest('/dictData/getByType/industry');
};
//单位性质
export const getNatureAPI = () => {
    return getRequest('/dictData/getByType/unit-nature');
};
//单位规模
export const unitSizeAPI = () => {
    return getRequest('/dictData/getByType/unit_scale');
};
//单位类型
export const flatTypeAPI = () => {
    return getRequest('/dictData/getByType/flatType');
};
//毕业届次
export const getClassAPI = () => {
    return getRequest('/dictData/getByType/graduationClass');
};
//省
export const getProvinceAPI = () => {
    return postRequest('/region/list/province');
};
//市
export const getCityAPI = params => {
    return postRequest('/region/list/city', params);
};
//区
export const getAreaAPI = params => {
    return postRequest('/region/list/area', params);
};
//获取所有学校
export const accessSchoolDataApi = () => postRequest('/schoolCode/getAll');
//就业类别
export const employmentCategoryDataAPI = params => postRequest('/gqQxCode/getTree', params);

// region TODO 省市区级联数据
// export const provincialDataApi = () => postRequest('/region/listAll');
export const provincialDataApi = param => postRequest('/areaCode/getAreaData', param);

// endregion
// region TODO 新的省市区级联数据
// export const newProvincialDataApi = () => postRequest('/region/newTree');
export const newProvincialDataApi = param => postRequest('/areaCode/getAreaData', param);
// endregion

// region TODO 新的省市区全部数据
// export const newAllProvincialDataApi = () => postRequest('/region/area');
export const newAllProvincialDataApi = param => postRequest('/areaCode/getAreaData', param);
// endregion

//获取就业状况
export const obtainEmploymentStatusDataAPI = () => getRequest('/dictData/getByType/qx');


// region TODO 获取单位所在地（大陆除外）
export const getUnitLocationListAPI = param => postRequest('/areaCode/getAreaData', param);
// export const getUnitLocationListAPI = param => postRequest('/region/list/abroad', param);

// region TODO 留学院校代码
export const overseasInstitutionDataApi = param => postRequest('/gwschoolCode/getAll', param);
//图片上传
export const imageUploadDataApi = param => postRequest('/upload/file', param, { transformRequest: [] });
//去向登记历史
export const destinationRegistrationHistoryApi = param => postRequest('/bysJyqxInfo/getls', param);
//就业类别
export const employmentCategoryAPI = params => postRequest('/gqQxCode/getAll', params);

// region TODO 获取级联地区数据
export const getAreaDataApi = param => postRequest('/areaCode/getAreaData', param);

// endregion
//根据单位名称获取标准单位库信息
export const searchCompaniesDataAPI = params => getRequest('/companies/search/', params );
